

<!DOCTYPE html>
<!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
<head>
  <meta charset="utf-8">
  
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  
  <title>OCC.Display.WebGl.x3dom_renderer module &mdash; pythonocc API 0.18 documentation</title>
  

  
  
  
  

  

  
  
    

  

  
  
    <link rel="stylesheet" href="static/css/theme.css" type="text/css" />
  

  

  
        <link rel="index" title="Index"
              href="genindex.html"/>
        <link rel="search" title="Search" href="search.html"/>
    <link rel="top" title="pythonocc API 0.18 documentation" href="index.html"/> 

  
  <script src="static/js/modernizr.min.js"></script>

</head>

<body class="wy-body-for-nav" role="document">

   
  <div class="wy-grid-for-nav">

    
    <nav data-toggle="wy-nav-shift" class="wy-nav-side">
      <div class="wy-side-scroll">
        <div class="wy-side-nav-search">
          

          
            <a href="index.html" class="icon icon-home"> pythonocc API
          

          
          </a>

          
            
            
              <div class="version">
                0.18
              </div>
            
          

          
<div role="search">
  <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
    <input type="text" name="q" placeholder="Search docs" />
    <input type="hidden" name="check_keywords" value="yes" />
    <input type="hidden" name="area" value="default" />
  </form>
</div>

          
        </div>

        <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
          
            
            
              
            
            
              <!-- Local TOC -->
              <div class="local-toc"><ul>
<li><a class="reference internal" href="#">OCC.Display.WebGl.x3dom_renderer module</a></li>
</ul>
</div>
            
          
        </div>
      </div>
    </nav>

    <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">

      
      <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
        
          <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
          <a href="index.html">pythonocc API</a>
        
      </nav>


      
      <div class="wy-nav-content">
        <div class="rst-content">
          















<div role="navigation" aria-label="breadcrumbs navigation">

  <ul class="wy-breadcrumbs">
    
      <li><a href="index.html">Docs</a> &raquo;</li>
        
      <li>OCC.Display.WebGl.x3dom_renderer module</li>
    
    
      <li class="wy-breadcrumbs-aside">
        
            
            <a href="sources/OCC.Display.WebGl.x3dom_renderer.rst.txt" rel="nofollow"> View page source</a>
          
        
      </li>
    
  </ul>

  
  <hr/>
</div>
          <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
           <div itemprop="articleBody">
            
  <div class="section" id="module-OCC.Display.WebGl.x3dom_renderer">
<span id="occ-display-webgl-x3dom-renderer-module"></span><h1>OCC.Display.WebGl.x3dom_renderer module<a class="headerlink" href="#module-OCC.Display.WebGl.x3dom_renderer" title="Permalink to this headline">¶</a></h1>
<dl class="function">
<dt id="OCC.Display.WebGl.x3dom_renderer.ExportEdgeToILS">
<code class="descname">ExportEdgeToILS</code><span class="sig-paren">(</span><em>edge_point_set</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.ExportEdgeToILS" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="OCC.Display.WebGl.x3dom_renderer.HTMLBody">
<em class="property">class </em><code class="descname">HTMLBody</code><span class="sig-paren">(</span><em>x3d_shapes</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.HTMLBody" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<p>x3d_shapes is a list that contains uid for each shape</p>
<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.HTMLBody.get_str">
<code class="descname">get_str</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.HTMLBody.get_str" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="OCC.Display.WebGl.x3dom_renderer.HTMLHeader">
<em class="property">class </em><code class="descname">HTMLHeader</code><span class="sig-paren">(</span><em>bg_gradient_color1='#ced7de'</em>, <em>bg_gradient_color2='#808080'</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.HTMLHeader" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.HTMLHeader.get_str">
<code class="descname">get_str</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.HTMLHeader.get_str" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DExporter">
<em class="property">class </em><code class="descname">X3DExporter</code><span class="sig-paren">(</span><em>shape</em>, <em>vertex_shader</em>, <em>fragment_shader</em>, <em>export_edges</em>, <em>color</em>, <em>specular_color</em>, <em>shininess</em>, <em>transparency</em>, <em>line_color</em>, <em>line_width</em>, <em>mesh_quality</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DExporter" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<p>A class for exporting a TopoDS_Shape to an x3d file</p>
<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DExporter.compute">
<code class="descname">compute</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DExporter.compute" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DExporter.to_x3dfile_string">
<code class="descname">to_x3dfile_string</code><span class="sig-paren">(</span><em>shape_id</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DExporter.to_x3dfile_string" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DExporter.write_to_file">
<code class="descname">write_to_file</code><span class="sig-paren">(</span><em>filename</em>, <em>shape_id</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DExporter.write_to_file" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DomRenderer">
<em class="property">class </em><code class="descname">X3DomRenderer</code><span class="sig-paren">(</span><em>path=None</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DomRenderer" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference external" href="https://docs.python.org/2/library/functions.html#object" title="(in Python v2.7)"><code class="xref py py-class docutils literal"><span class="pre">object</span></code></a></p>
<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.DisplayShape">
<code class="descname">DisplayShape</code><span class="sig-paren">(</span><em>shape</em>, <em>vertex_shader=None</em>, <em>fragment_shader=None</em>, <em>export_edges=False</em>, <em>color=(0.65</em>, <em>0.65</em>, <em>0.65)</em>, <em>specular_color=(1</em>, <em>1</em>, <em>1)</em>, <em>shininess=0.9</em>, <em>transparency=0.0</em>, <em>line_color=(0</em>, <em>0.0</em>, <em>0.0)</em>, <em>line_width=2.0</em>, <em>mesh_quality=1.0</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.DisplayShape" title="Permalink to this definition">¶</a></dt>
<dd><p>Adds a shape to the rendering buffer. This class computes the x3d file</p>
</dd></dl>

<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.GenerateHTMLFile">
<code class="descname">GenerateHTMLFile</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.GenerateHTMLFile" title="Permalink to this definition">¶</a></dt>
<dd><p>Generate the HTML file to be rendered wy the web browser</p>
</dd></dl>

<dl class="method">
<dt id="OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.render">
<code class="descname">render</code><span class="sig-paren">(</span><em>server_port=8080</em>, <em>open_webbrowser=False</em><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.X3DomRenderer.render" title="Permalink to this definition">¶</a></dt>
<dd><p>Call the render() method to display the X3D scene.</p>
</dd></dl>

</dd></dl>

<dl class="function">
<dt id="OCC.Display.WebGl.x3dom_renderer.spinning_cursor">
<code class="descname">spinning_cursor</code><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#OCC.Display.WebGl.x3dom_renderer.spinning_cursor" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</div>


           </div>
           <div class="articleComments">
            
           </div>
          </div>
          <footer>
  

  <hr/>

  <div role="contentinfo">
    <p>
        &copy; Copyright 2017, Thomas Paviot.

    </p>
  </div>
  Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. 

</footer>

        </div>
      </div>

    </section>

  </div>
  


  

    <script type="text/javascript">
        var DOCUMENTATION_OPTIONS = {
            URL_ROOT:'./',
            VERSION:'0.18',
            COLLAPSE_INDEX:false,
            FILE_SUFFIX:'.html',
            HAS_SOURCE:  true,
            SOURCELINK_SUFFIX: '.txt'
        };
    </script>
      <script type="text/javascript" src="static/jquery.js"></script>
      <script type="text/javascript" src="static/underscore.js"></script>
      <script type="text/javascript" src="static/doctools.js"></script>

  

  
  
    <script type="text/javascript" src="static/js/theme.js"></script>
  

  
  
  <script type="text/javascript">
      jQuery(function () {
          SphinxRtdTheme.StickyNav.enable();
      });
  </script>
   

</body>
</html>